package com.rdc.qingkou.dto;


import android.widget.Toast;

import com.google.gson.annotations.SerializedName;
import com.rdc.qingkou.Application.MyApplication;

import java.util.ArrayList;
import java.util.List;

public class CustomTagDTO {
    //请求结果
    private String result;

    @SerializedName("message")
    private List<String> tagList;

    public List<String> transform() {
        List<String> list = new ArrayList<>();
        list.add("订阅");
        list.add("热门");
        list.add("原创");
        list.add("摘录");
        if (result.equals("success")) {
            if (tagList == null) {
                return list;
            }
            list.addAll(tagList);
            return list;
        } else {
            Toast.makeText(MyApplication.getContext(), "主页获取自定义标签失败！result:" + result, Toast.LENGTH_SHORT).show();
            return list;
        }
    }

    public void setResult(String result) {
        this.result = result;
    }

    public String getResult() {
        return this.result;
    }

    public List<String> getTagList() {
        return tagList;
    }

    public void setTagList(List<String> tagList) {
        this.tagList = tagList;
    }
}
